package com.bt7274.pojo;

import lombok.Data;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 帖子表 ：记录每个板块下的帖子
 * </p>
 *
 * @author hp
 * @since 2025-03-25
 */
@Data
public class Post implements Serializable {

    private static final long serialVersionUID = 1L;

    @Getter
    private String id;

    /**
     * 所属版块id
     */
    @Getter
    private Integer forumId;

    /**
     * 发帖用户id
     */
    @Getter
    private String userId;

    /**
     * 帖子标题
     */
    @Getter
    private String title;

    /**
     * 帖子内容
     */
    @Getter
    private String content;

    /**
     * 发帖时间
     */
    @Getter
    private LocalDateTime createdTime;
    /**
     * 更新时间
     */
    @Getter
    private LocalDateTime updatedTime;

    /**
     * 是否置顶
     */
    @Getter
    private Integer isPinned=0;

    @Getter
    private String imageUML;

    /**
        * 帖子类型：1-普通帖子，2-精华帖,3-悬赏贴
        */
    private Integer type=1;

    /**
     * 帖子状态：1-正常，2-审核中，3-已锁定
     */
    @Getter
    private Integer status=1;
    /**
     * 点赞数
     */
    @Getter
    private Integer likeCount=0;
    /**
     * 点踩数
     */
    @Getter
    private Integer unlikeCount=0;
    /**
     * 评论数
     */
    @Getter
    private Integer commentCount=0;
    /**
     * 点击量
     */
    @Getter
    private Integer viewCount=0;



    public void setId(String id) {
        this.id = id;
    }

    public void setForumId(Integer forumId) {
        this.forumId = forumId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public void setUpdatedTime(LocalDateTime updatedTime) {
        this.updatedTime = updatedTime;
    }


    public void setCreatedTime(LocalDateTime createdTime) {
        this.createdTime = createdTime;
    }


    public void setIsPinned(Integer isPinned) {
        this.isPinned = isPinned;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public void setLikeCount(Integer likeCount) {
        this.likeCount = likeCount;
    }

    public void setUnlikeCount(Integer unlikeCount) {
        this.unlikeCount = unlikeCount;
    }

    public void setCommentCount(Integer commentCount) {
        this.commentCount = commentCount;
    }

    public void setViewCount(Integer viewCount) {
        this.viewCount = viewCount;
    }

    public void setImageUML(String imageUML) {
        this.imageUML = imageUML;
    }
    public void setType(Integer type) {
        this.type = type;
    }



    @Override
    public String toString() {
        return "Post{" +
        "id = " + id +
        ", forumId = " + forumId +
        ", userId = " + userId +
        ", title = " + title +
        ", content = " + content +
        ", createdTime = " + createdTime +
        ", isPinned = " + isPinned +
        "}";
    }
}
